package vsvm.gui.forms;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import libsvm.svm_parameter;
import vsvm.classifier.LibSvmClassifier;

public class ConfigureSvmLibDialog extends JDialog {
	private final static String TYPE_CSVM = "C-SVM";
	private final static String TYPE_NUSVM = "NU-SVM";
	private final static String KERNEL_LINEAR = "Linear";
	private final static String KERNEL_POLY = "Polynomial";
	private final static String KERNEL_RBF = "Radial based function";
	private final static String KERNEL_SIGMOID = "Sigmoid";

	private JPanel jContentPane = null;
	private JPanel pnlButtons = null;
	private JPanel pnlCenter = null;
	private JLabel lblType = null;
	private JLabel lblKernel = null;
	private JLabel lblDegree = null;
	private JLabel lblGamma = null;
	private JLabel lblCoef0 = null;
	private JLabel lblC = null;
	private JLabel lblNu = null;
	private JLabel lblCache = null;
	private JLabel lblEps = null;
	private JLabel lblP = null;
	private JComboBox cmbtype = null;
	private JComboBox cmbKernel = null;
	private JTextField txtDegree = null;
	private JTextField txtGamma = null;
	private JTextField txtCoef0 = null;
	private JTextField txtC = null;
	private JTextField txtNu = null;
	private JTextField txtCache = null;
	private JTextField txtEps = null;
	private JTextField txtP = null;
	private JCheckBox chkShrinking = null;
	private JButton btnOk = null;
	private JButton btnCancel = null;

	private LibSvmClassifier c;
	
	
	
	private void loadParameters(svm_parameter p) {
		if (p.svm_type == svm_parameter.C_SVC)
			cmbtype.setSelectedItem(TYPE_CSVM);
		else
			cmbtype.setSelectedItem(TYPE_NUSVM);
		
		if (p.kernel_type == svm_parameter.LINEAR)
			cmbKernel.setSelectedItem(KERNEL_LINEAR);
		else if (p.kernel_type == svm_parameter.POLY)
			cmbKernel.setSelectedItem(KERNEL_POLY);
		else if (p.kernel_type == svm_parameter.RBF)
			cmbKernel.setSelectedItem(KERNEL_RBF);
		else
			cmbKernel.setSelectedItem(KERNEL_SIGMOID);
		
		txtC.setText(Double.toString(p.C));
		txtCache.setText(Double.toString(p.cache_size));
		txtCoef0.setText(Double.toString(p.coef0));
		txtDegree.setText(Integer.toString(p.degree));
		txtEps.setText(Double.toString(p.eps));
		txtGamma.setText(Double.toString(p.gamma));
		txtNu.setText(Double.toString(p.nu));
		txtP.setText(Double.toString(p.p));
		chkShrinking.setSelected(p.shrinking == 1);
	}
	
	
	private boolean validateParameters() {
		try {
			Double.parseDouble(txtC.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Cost must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtCache.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Cache size must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtCoef0.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Coef0 must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtEps.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Epsilon must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtGamma.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Gamma must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtNu.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Nu must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Double.parseDouble(txtP.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "P must be number.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		try {
			Integer.parseInt(txtDegree.getText());			
		} catch (NumberFormatException e) {
			JOptionPane.showMessageDialog(this, "Degree must be integer.", "Error", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		
		return true;
	}
	
	
	private void updateParameters() {
		svm_parameter p = new svm_parameter();
		
		try {
			p.C = Double.parseDouble(txtC.getText());
			p.cache_size = Double.parseDouble(txtCache.getText());
			p.coef0 = Double.parseDouble(txtCoef0.getText());
			p.degree = Integer.parseInt(txtDegree.getText());
			p.eps = Double.parseDouble(txtEps.getText());
			p.gamma = Double.parseDouble(txtGamma.getText());
			p.nu = Double.parseDouble(txtNu.getText());
			p.p = Double.parseDouble(txtP.getText());
			p.shrinking = chkShrinking.isSelected()? 1 : 0;
			p.svm_type = cmbtype.getSelectedItem().equals(TYPE_CSVM) ? svm_parameter.C_SVC : svm_parameter.NU_SVC;
			
			p.probability = 1;
			p.nr_weight = 0;
			p.weight_label = null;
			p.weight = null;
			
			if (cmbKernel.getSelectedItem().equals(KERNEL_LINEAR))
				p.kernel_type = svm_parameter.LINEAR;
			else if (cmbKernel.getSelectedItem().equals(KERNEL_POLY))
				p.kernel_type = svm_parameter.POLY;
			else if (cmbKernel.getSelectedItem().equals(KERNEL_RBF))
				p.kernel_type = svm_parameter.RBF;
			else
				p.kernel_type = svm_parameter.SIGMOID;
			
		} catch (Exception e) { return; }
		
		c.setParams(p);		
	}
	
	
	private void updateControls() {
		if (cmbtype.getSelectedItem().equals(TYPE_CSVM)) {
			txtC.setEnabled(true);
			txtNu.setEnabled(false);
		} else {
			txtC.setEnabled(false);
			txtNu.setEnabled(true);			
		}
		
		txtDegree.setEnabled(cmbKernel.getSelectedItem().equals(KERNEL_POLY));
		txtCoef0.setEnabled(cmbKernel.getSelectedItem().equals(KERNEL_POLY) || cmbKernel.getSelectedItem().equals(KERNEL_SIGMOID));
		txtGamma.setEnabled(!cmbKernel.getSelectedItem().equals(KERNEL_LINEAR));
	}
	
	
	/**
	 * This method initializes pnlButtons	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getPnlButtons() {
		if (pnlButtons == null) {
			FlowLayout flowLayout = new FlowLayout();
			flowLayout.setHgap(25);
			pnlButtons = new JPanel();
			pnlButtons.setLayout(flowLayout);
			pnlButtons.setPreferredSize(new java.awt.Dimension(45,45));
			pnlButtons.add(getBtnOk(), null);
			pnlButtons.add(getBtnCancel(), null);
		}
		return pnlButtons;
	}

	/**
	 * This method initializes pnlCenter	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getPnlCenter() {
		if (pnlCenter == null) {
			GridBagConstraints gridBagConstraints20 = new GridBagConstraints();
			gridBagConstraints20.gridx = 1;
			gridBagConstraints20.weighty = 1.0;
			gridBagConstraints20.anchor = java.awt.GridBagConstraints.EAST;
			gridBagConstraints20.insets = new java.awt.Insets(0,0,0,25);
			gridBagConstraints20.gridy = 10;
			GridBagConstraints gridBagConstraints19 = new GridBagConstraints();
			gridBagConstraints19.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints19.gridy = 9;
			gridBagConstraints19.weightx = 1.0;
			gridBagConstraints19.weighty = 1.0;
			gridBagConstraints19.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints19.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints19.gridx = 1;
			GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
			gridBagConstraints18.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints18.gridy = 8;
			gridBagConstraints18.weightx = 1.0;
			gridBagConstraints18.weighty = 1.0;
			gridBagConstraints18.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints18.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints18.gridx = 1;
			GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
			gridBagConstraints17.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints17.gridy = 7;
			gridBagConstraints17.weightx = 1.0;
			gridBagConstraints17.weighty = 1.0;
			gridBagConstraints17.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints17.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints17.gridx = 1;
			GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
			gridBagConstraints16.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints16.gridy = 6;
			gridBagConstraints16.weightx = 1.0;
			gridBagConstraints16.weighty = 1.0;
			gridBagConstraints16.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints16.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints16.gridx = 1;
			GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
			gridBagConstraints15.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints15.gridy = 5;
			gridBagConstraints15.weightx = 1.0;
			gridBagConstraints15.weighty = 1.0;
			gridBagConstraints15.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints15.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints15.gridx = 1;
			GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
			gridBagConstraints14.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints14.gridy = 4;
			gridBagConstraints14.weightx = 1.0;
			gridBagConstraints14.weighty = 1.0;
			gridBagConstraints14.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints14.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints14.gridx = 1;
			GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
			gridBagConstraints13.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints13.gridy = 3;
			gridBagConstraints13.weightx = 1.0;
			gridBagConstraints13.weighty = 1.0;
			gridBagConstraints13.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints13.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints13.gridx = 1;
			GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
			gridBagConstraints12.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints12.gridy = 2;
			gridBagConstraints12.weightx = 1.0;
			gridBagConstraints12.weighty = 1.0;
			gridBagConstraints12.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints12.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints12.gridx = 1;
			GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
			gridBagConstraints11.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints11.gridy = 1;
			gridBagConstraints11.weightx = 1.0;
			gridBagConstraints11.weighty = 1.0;
			gridBagConstraints11.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints11.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints11.gridx = 1;
			GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
			gridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL;
			gridBagConstraints10.gridy = 0;
			gridBagConstraints10.weightx = 1.0;
			gridBagConstraints10.weighty = 1.0;
			gridBagConstraints10.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints10.insets = new java.awt.Insets(0,10,0,20);
			gridBagConstraints10.gridx = 1;
			GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
			gridBagConstraints9.gridx = 0;
			gridBagConstraints9.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints9.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints9.weighty = 1.0;
			gridBagConstraints9.gridy = 9;
			lblP = new JLabel();
			lblP.setText("P");
			GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
			gridBagConstraints8.gridx = 0;
			gridBagConstraints8.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints8.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints8.weighty = 1.0;
			gridBagConstraints8.gridy = 8;
			lblEps = new JLabel();
			lblEps.setText("Epsilon");
			GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
			gridBagConstraints7.gridx = 0;
			gridBagConstraints7.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints7.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints7.weighty = 1.0;
			gridBagConstraints7.gridy = 7;
			lblCache = new JLabel();
			lblCache.setText("Cache size");
			GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
			gridBagConstraints6.gridx = 0;
			gridBagConstraints6.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints6.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints6.weighty = 1.0;
			gridBagConstraints6.gridy = 6;
			lblNu = new JLabel();
			lblNu.setText("Nu");
			GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
			gridBagConstraints5.gridx = 0;
			gridBagConstraints5.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints5.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints5.weighty = 1.0;
			gridBagConstraints5.gridy = 5;
			lblC = new JLabel();
			lblC.setText("Cost (C)");
			GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
			gridBagConstraints4.gridx = 0;
			gridBagConstraints4.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints4.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints4.weighty = 1.0;
			gridBagConstraints4.gridy = 4;
			lblCoef0 = new JLabel();
			lblCoef0.setText("Coef0");
			GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
			gridBagConstraints3.gridx = 0;
			gridBagConstraints3.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints3.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints3.weighty = 1.0;
			gridBagConstraints3.gridy = 3;
			lblGamma = new JLabel();
			lblGamma.setText("Gamma");
			GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
			gridBagConstraints2.gridx = 0;
			gridBagConstraints2.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints2.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints2.weighty = 1.0;
			gridBagConstraints2.gridy = 2;
			lblDegree = new JLabel();
			lblDegree.setText("Degree");
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
			gridBagConstraints1.gridx = 0;
			gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints1.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints1.weighty = 1.0;
			gridBagConstraints1.gridy = 1;
			lblKernel = new JLabel();
			lblKernel.setText("Kernel type");
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
			gridBagConstraints.gridx = 0;
			gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
			gridBagConstraints.insets = new java.awt.Insets(0,15,0,10);
			gridBagConstraints.weighty = 1.0;
			gridBagConstraints.gridy = 0;
			lblType = new JLabel();
			lblType.setText("SVM type");
			pnlCenter = new JPanel();
			pnlCenter.setLayout(new GridBagLayout());
			pnlCenter.add(lblType, gridBagConstraints);
			pnlCenter.add(lblKernel, gridBagConstraints1);
			pnlCenter.add(lblDegree, gridBagConstraints2);
			pnlCenter.add(lblGamma, gridBagConstraints3);
			pnlCenter.add(lblCoef0, gridBagConstraints4);
			pnlCenter.add(lblC, gridBagConstraints5);
			pnlCenter.add(lblNu, gridBagConstraints6);
			pnlCenter.add(lblCache, gridBagConstraints7);
			pnlCenter.add(lblEps, gridBagConstraints8);
			pnlCenter.add(lblP, gridBagConstraints9);
			pnlCenter.add(getCmbtype(), gridBagConstraints10);
			pnlCenter.add(getCmbKernel(), gridBagConstraints11);
			pnlCenter.add(getTxtDegree(), gridBagConstraints12);
			pnlCenter.add(getTxtGamma(), gridBagConstraints13);
			pnlCenter.add(getTxtCoef0(), gridBagConstraints14);
			pnlCenter.add(getTxtC(), gridBagConstraints15);
			pnlCenter.add(getTxtNu(), gridBagConstraints16);
			pnlCenter.add(getTxtCache(), gridBagConstraints17);
			pnlCenter.add(getTxtEps(), gridBagConstraints18);
			pnlCenter.add(getTxtP(), gridBagConstraints19);
			pnlCenter.add(getChkShrinking(), gridBagConstraints20);
		}
		return pnlCenter;
	}

	/**
	 * This method initializes cmbtype	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getCmbtype() {
		if (cmbtype == null) {
			cmbtype = new JComboBox();
			cmbtype.setModel(new DefaultComboBoxModel(new Object[] {TYPE_CSVM, TYPE_NUSVM}));
			cmbtype.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					updateControls();
				}
			});
		}
		return cmbtype;
	}

	/**
	 * This method initializes cmbKernel	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getCmbKernel() {
		if (cmbKernel == null) {
			cmbKernel = new JComboBox();
			cmbKernel.setModel(new DefaultComboBoxModel(new Object[] 
             {KERNEL_LINEAR, KERNEL_POLY, KERNEL_RBF, KERNEL_SIGMOID}));
			cmbKernel.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					updateControls();
				}
			});
		}
		return cmbKernel;
	}

	/**
	 * This method initializes txtDegree	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtDegree() {
		if (txtDegree == null) {
			txtDegree = new JTextField();
		}
		return txtDegree;
	}

	/**
	 * This method initializes txtGamma	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtGamma() {
		if (txtGamma == null) {
			txtGamma = new JTextField();
		}
		return txtGamma;
	}

	/**
	 * This method initializes txtCoef0	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtCoef0() {
		if (txtCoef0 == null) {
			txtCoef0 = new JTextField();
		}
		return txtCoef0;
	}

	/**
	 * This method initializes txtC	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtC() {
		if (txtC == null) {
			txtC = new JTextField();
		}
		return txtC;
	}

	/**
	 * This method initializes txtNu	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtNu() {
		if (txtNu == null) {
			txtNu = new JTextField();
		}
		return txtNu;
	}

	/**
	 * This method initializes txtCache	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtCache() {
		if (txtCache == null) {
			txtCache = new JTextField();
		}
		return txtCache;
	}

	/**
	 * This method initializes txtEps	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtEps() {
		if (txtEps == null) {
			txtEps = new JTextField();
		}
		return txtEps;
	}

	/**
	 * This method initializes txtP	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getTxtP() {
		if (txtP == null) {
			txtP = new JTextField();
		}
		return txtP;
	}

	/**
	 * This method initializes chkShrinking	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getChkShrinking() {
		if (chkShrinking == null) {
			chkShrinking = new JCheckBox();
			chkShrinking.setText("Shrinking");
		}
		return chkShrinking;
	}

	/**
	 * This method initializes btnOk	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBtnOk() {
		if (btnOk == null) {
			btnOk = new JButton();
			btnOk.setPreferredSize(new java.awt.Dimension(80,25));
			btnOk.setText("OK");
			btnOk.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					if (validateParameters()) {
						updateParameters();
						dispose();
					}
				}
			});
		}
		return btnOk;
	}

	/**
	 * This method initializes btnCancel	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getBtnCancel() {
		if (btnCancel == null) {
			btnCancel = new JButton();
			btnCancel.setText("Cancel");
			btnCancel.setPreferredSize(new java.awt.Dimension(80,25));
			btnCancel.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					dispose();
				}
			});
		}
		return btnCancel;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	/**
	 * This is the default constructor
	 */
	public ConfigureSvmLibDialog(Frame parent, LibSvmClassifier c) {
		super(parent);
		initialize();
		setModal(true);
		setLocationRelativeTo(parent);
		
		this.c = c;
		loadParameters(c.getParams());
		updateControls();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(322, 381);
		this.setResizable(false);
		this.setTitle("MultiLibSvm classifier parameters");
		this.setContentPane(getJContentPane());
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
			jContentPane.add(getPnlButtons(), java.awt.BorderLayout.SOUTH);
			jContentPane.add(getPnlCenter(), java.awt.BorderLayout.CENTER);
		}
		return jContentPane;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
